			
	    	 function buildChartControls() {
		        document.getElementById("min_avg").onchange = function() {
			        var min_field=document.getElementById("min_avg");
			        var index = min_field.selectedIndex;
			        min_avg=parseInt(min_field[index].text);
			        if(annotatedtimeline!=undefined) {
						printViz();	
			        }
		        }
		        document.getElementById("max_avg").onchange = function() {
			        var max_field=document.getElementById("max_avg");
			        var index = max_field.selectedIndex;
			        max_avg = parseInt(max_field[index].text);
			        if(annotatedtimeline!=undefined) {
						printViz();	
			        }
		        }
		        document.getElementById("min_year").onchange = function() {
		        	var oldYear = minYear;
			        var min_field=document.getElementById("min_year");
			        var index = min_field.selectedIndex;
			        minViewYear=parseInt(min_field[index].text);
			        if(annotatedtimeline!=undefined) {
						printViz();	
			        }
		        }
		        document.getElementById("max_year").onchange = function() {
		        	var oldYear = maxYear;
			        var max_field=document.getElementById("max_year");
			        var index = max_field.selectedIndex;
			        maxViewYear = parseInt(max_field[index].text);
			        if(annotatedtimeline!=undefined) {
						printViz();	
			        }
		        }
		        document.getElementById("chartSelect").onchange = function() {
			        var field = document.getElementById("chartSelect");
			        var aux = field.selectedIndex;
			        if(viz!=aux) {
			        	viz = aux;
			        	reloadVisualization();
			        }
		        }
		        document.getElementById("min_grade").onchange = function() {
			        var field = document.getElementById("min_grade");
			        var checked = field.checked;
			        if(checked) {
			        	addMinGrade();
			        }
			        else {
			        	removeMinGrade();			        	
			        }
		        }
		        document.getElementById("all_grades").onchange = function() {
			        var field = document.getElementById("all_grades");
			        var checked = field.checked;
			        if(checked) {
			        	addAllGrades();
			        }
			        else {
			        	removeAllGrades();			        	
			        }
		        }
		        document.getElementById("clean").onclick = function(){
		        	cleanAllDataSelected();
		        }
	        }	        